import common from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import multiInput from 'rollup-plugin-multi-input';
const plugins = [
    json(),
    common(),
    resolve({
        browser: true,
    }),
];
export default [
    {
        input: './src/core/index.js', // 打包入口
        output: [
            {
                // 打包出口
                file: './dist/core.js',
                format: 'es',
            },
        ],
        plugins,
    },
    {
        input: ['./src/plugins/*.js'],
        output: [
            {
                format: 'es',
                dir: './dist',
            },
        ],
        plugins: [multiInput({}), ...plugins],
    },
    {
        input: ['./src/middleware/*.js'],
        output: [
            {
                format: 'es',
                dir: './dist',
            },
        ],
        plugins: [multiInput({}), ...plugins],
    },
];
